package edu.up.taglibs;

import java.io.IOException;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.PageContext;
import javax.servlet.jsp.tagext.SimpleTagSupport;

public class alertTag extends SimpleTagSupport {

	@Override
	public void doTag() throws JspException, IOException {
		PageContext pageContext = (PageContext) getJspContext();
		String erro = (String) pageContext.getSession().getAttribute("erro");

		try {
			JspWriter out = pageContext.getOut();
			out.print("<script>"
					+ "alert('USUARIO NAO ENCONTRADO OU SENHA INCORRETA');"
					+ "</script>");
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
